package com.example.demo;
import java.awt.*;
import java.awt.event.*;
import java.time.*;
import javax.swing.*;

public class timetest{
    public static void main(String []args){
        var listener = new callbackTest();
        var t = new Timer(100,listener);
        t.start();
        JOptionPane.showMessageDialog(null,"ssss");
        System.exit(0);
    }

}

class callbackTest implements ActionListener{
    @Override
    public void actionPerformed(ActionEvent e) {
        System.out.println("time:" + e.getWhen());
    }
}
